import React, {FC} from "react";
import {useSearchParams} from "react-router-dom";

const AnnouncementDetails: FC = () => {
    const [searchParams] = useSearchParams()

    return (
        <div style={{overflow: "auto", height: "100%"}}>
            <h1 style={{textAlign: "center", fontSize: "30px"}}>{searchParams.get('title')}</h1>
            <div style={{textAlign: "center", margin: "10px"}}>
                <span style={{padding: "0 10px"}}>{searchParams.get('time')}</span>
                <span style={{padding: "0 10px"}}>{searchParams.get('username')}</span>
            </div>
            <div dangerouslySetInnerHTML={{__html: searchParams.get('content')!}}></div>
        </div>
    )
}
export default AnnouncementDetails;